package base.IO流;

import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.ObjectInputStream;
import java.util.ArrayList;

public class 反序列化 {
    public static void main(String[] args) throws IOException, ClassNotFoundException {
        File file = new File(".\\src\\base\\IO流\\girl.txt");
        ObjectInputStream ois = new ObjectInputStream(new FileInputStream(file));

        Object o = ois.readObject();
        ArrayList<Girlfriend> list = (ArrayList<Girlfriend>) o;
        for (Girlfriend g : list){
            System.out.println(g);
        }
        
    }
}
